from mindspore import ops
from mindspore import Tensor
import numpy as np

# NOTE: you can change shape, datatype, axis, 
# which can reproduce all of single op results of CUDNN

input_x = Tensor(np.random.randn(768, 768).astype(np.float64))
op = ops.ReduceSum(keep_dims=True)
output = op(input_x, axis=(1,))


# input_x = Tensor(np.random.randn(256,56,56,256).astype(np.float32))
# op = ops.ReduceSum(keep_dims=True)
# output = op(input_x, axis=(0,1,2))

